package statePattern.test;

import statePattern.normal.Context;
import statePattern.normal.StartState;
import statePattern.normal.StopState;

/**
 * @Author : 叶荻风
 * @create : 2024/6/27 16:40
 */
public class test {
    public static void main(String[] args) {
        Context context = new Context();
        StartState startState = new StartState();
        startState.doAction(context);
        System.out.println(context.getState().getStateEnum());
        StopState stopState = new StopState();
        stopState.doAction(context);
        System.out.println(context.getState().getStateEnum());
    }
}
